package com.yyh.mapper;

import com.yyh.entity.Roles;
import com.yyh.entity.Users;
import com.yyh.entity.UsersParam;

import java.util.List;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yangyueheng
 * @since 2020-06-02
 */
public interface UsersMapper extends BaseMapper<Users> {
	List<Roles> getRolesByUsersId(Integer uid);

	List<Users> getZiXunShi(UsersParam u);

	@Update("update users set qd_static=1,qd_time=now(),qt_time=null where id = #{id}")
	boolean qiandao(Integer id);

	@Update("update users set qd_static=2,qt_time=now() where id = #{id}")
	boolean qiantui(Integer id);

	@Update("update users set qd_static=0,qt_time=now() where qd_static=1")
	int dingshi();
}
